﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Aandelendelen.Caching;

namespace Aandelendelen.Admin
{
	public partial class AdminMaintenance : AdminBaseForm
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			if (this.IsPostBack)
			{
				if (Request["__EVENTTARGET"] == this.btnClearCache.ClientID)
				{
					this.ClearCache();
				}

				this.Response.Redirect("AdminMaintenance.aspx"); //reload
			}
		}

		private void ClearCache()
		{
			DataCache.ClearAll();
		}
	}
}